//
//  YLCollectionDetailsViewController.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/14.
//  Copyright © 2017年 she1323. All rights reserved.
//   收款详情

#import "YLCollectionDetailsViewController.h"
#import "XXPageTabView.h"
#import "XXPageTabItemLable.h"
#import "YLGlobeHeader.h"
#import "YLReceivablesViewController.h"
@interface YLCollectionDetailsViewController ()<XXPageTabViewDelegate>
@property (nonatomic, strong) XXPageTabView *pageTabView;
@end

@implementation YLCollectionDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"收款详情";
    [self setUpPageTabView];
}

- (void)setUpPageTabView
{
    YLReceivablesViewController *vc1 = [[YLReceivablesViewController alloc] init];
    vc1.status = 1;
    vc1.contractCode = _contractCode;
    
    YLReceivablesViewController *vc2 = [[YLReceivablesViewController alloc] init];
    vc2.status = 2;
    vc2.contractCode = _contractCode;
    
    [self addChildViewController:vc1];
    [self addChildViewController:vc2];
    
    //支持网易云音乐，今日头条，微博等切换栏效果
    self.pageTabView = [[XXPageTabView alloc] initWithChildControllers:self.childViewControllers childTitles:@[@"未收款", @"已收款"]];
    self.pageTabView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-64);
    self.pageTabView.tabSize = CGSizeMake(YLScreenW, 44.0f);
    self.pageTabView.selectedColor = YLLOrgColor;
    self.pageTabView.separatorColor = YLColor(200, 200, 200);
    self.pageTabView.unSelectedColor = YLLineColor;
    self.pageTabView.delegate = self;
    self.pageTabView.indicatorHeight = 1.5;
    self.pageTabView.titleStyle = XXPageTabTitleStyleDefault;
    self.pageTabView.indicatorStyle = XXPageTabIndicatorStyleStretch;
    self.pageTabView.indicatorWidth = YLScreenW / 2.0 - 30;
    [self.view addSubview:self.pageTabView];
}



- (void)pageTabViewDidEndChange {
   // NSLog(@"#####%d", (int)self.pageTabView.selectedTabIndex);
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
